package online.yangcloud.core.common;

import online.yangcloud.common.common.AppConstants;

import java.io.File;

/**
 * @author zhuboyang
 * @since 2023年11月27 14:45:43
 */
public interface StaticConstants {

    /**
     * 上传文件相关
     */
    interface Uploader {
        // 文件块 hash 校验
        String HASH_CHECK = "hash_check:";
        // 文件块上传的并发锁
        String BLOCK_UPLOAD_CONCURRENCE_LOCK = "upload_file_block_lock:";
        // 文件块上传缓存
        String FILE_BLOCK_UPLOAD_PREFIX = "file_block_upload:";
        // 总上传目录
        String UPLOAD = "upload" + File.separator;
        // 文件上传目录
        String FILE = UPLOAD + "file" + File.separator;
        // 文件块上传目录
        String BLOCK = UPLOAD + "block" + File.separator;
        // 临时文件存放目录
        String TMP = "tmp" + File.separator;
        // 缩略图存放目录
        String SNAPSHOT = "snapshot" + AppConstants.Special.SEPARATOR;
    }

    /**
     * 页面展示图标
     */
    interface Icon {
        // 默认宽度
        float DEFAULT_WIDTH = 500f;
    }

    /**
     * 预览转换相关
     */
    interface PreviewConverter {
        // 执行锁
        String PROCESS_LOCK = "can_process:preview_converter";
        // 转换锁
        String CONVERT_LOCK = "preview_convert:";
        // 转换任务
        String CONVERT_TASK = "preview_convert_task";
    }

}
